/*
 * Created on Jan 23, 2004
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.vectrics.user.client;

import org.vectrics.VectricsException;
import org.vectrics.client.module.Module;

/**
 * @author mmoore
 */
import org.vectrics.client.module.ModuleManager;
import org.vectrics.client.module.NavigationPanel;
import org.vectrics.client.module.ModulePanel;
import org.vectrics.user.PersonSynch;



public class UserEditModule extends Module {
	private static String NAME = "User Edit";

	public String getName() {
		return(NAME);
	}

	public void editUser(PersonSynch userSynch) throws VectricsException {
		if (userSynch.getPerson() == null) {
			UserDataManager userMgr = UserDataManager.getInstance();
			userMgr.getUserDetails(userSynch);
		}
		UserEditPanel editPanel = (UserEditPanel)super.getMainPanel();
		editPanel.setUser(userSynch);
		ModuleManager.getInstance().showModule(this);
	}
	
	
	protected ModulePanel createMainPanel() {
		return(new UserEditPanel());
	}
	
	protected NavigationPanel createNavigationPanel() {
		return(null);
		
	}

	protected void onActivate() {
		
	}

}
